package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-15
 */
public class Attestation implements Sequenceable, Serializable {
    @SerializedName("playerAttestationRenderer")
    private PlayerAttestationRenderer playerAttestationRenderer;

    public static final Sequenceable.Producer<Attestation> CREATOR = new Producer<Attestation>() {
        @Override
        public Attestation createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            Attestation attestation = new Attestation();
            attestation.unmarshalling(parcel);
            return attestation;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.playerAttestationRenderer);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.playerAttestationRenderer);
        return true;
    }

    @Override
    public String toString() {
        return "Attestation{" +
                "playerAttestationRenderer = '" + playerAttestationRenderer + '\'' +
                "}";
    }

    public PlayerAttestationRenderer getPlayerAttestationRenderer() {
        return playerAttestationRenderer;
    }

    public void setPlayerAttestationRenderer(PlayerAttestationRenderer playerAttestationRenderer) {
        this.playerAttestationRenderer = playerAttestationRenderer;
    }
}
